package cn.westv.scps.utils;

import java.util.HashMap;
import java.util.Map;

public class ThreadLocalUtils {
	private static ThreadLocal<Map<String, Map<String, Object>>> tl;
	private static Map<String, Map<String, Object>> threadLocalMap;
	static {
		tl = new ThreadLocal<Map<String, Map<String, Object>>>();
		threadLocalMap = new HashMap<String, Map<String, Object>>();
		tl.set(threadLocalMap);
	}

	public static Map<String, Object> getThreadLocalMap(String key) {
		return threadLocalMap.get(key);
	}

	public static void setThreadLocalMap(String Key, Map<String, Object> value) {
		if (!threadLocalMap.containsValue(value)) {
			threadLocalMap.put(Key, value);
		}
	}

}
